<template>
  <div class="detail">
      <div class="box">
          <div class="left">
              <div class="top">
                  <img :src="item.item_info.author_user_info.avatar_large" alt="">
                  <div>
                      <h1>{{item.item_info.author_user_info.user_name}}</h1>
                      <p>
                          <span>{{item.item_info.article_info.ctime}}</span>
                          <span>阅读 {{item.item_info.article_info.view_count}}</span>
                      </p>
                  </div>
                <button>关注</button>
              </div>
              <div class="bannar" v-if="item.item_info.article_info.cover_image">
                  <img :src="item.item_info.article_info.cover_image" alt="">
              </div>
              <div class="content">
                  <h1>{{item.item_info.article_info.title}}</h1>
                  <p>
                      {{item.item_info.article_info.brief_content}}
                  </p>
              </div>
          </div>
          <div class="right">
            <div class="author">
            <div class="text">关于作者</div>
            <div class="info">
                <div class="img">
                    <img :src="item.item_info.author_user_info.avatar_large" alt="">
                </div>
                <div class="info_main">
                    <!-- <h3>{{$store.state.detailContent.author_user_info.user_name}}</h3>
                    <p>{{$store.state.detailContent.author_user_info.description}}</p> -->
                </div>
            </div>
            <!-- <p class="post">获得点赞 {{$store.state.detailContent.author_user_info.got_digg_count}}</p> -->
            <!-- <p class="read">文章被阅读 {{$store.state.detailContent.author_user_info.got_view_count}}</p> -->
        </div>
        <ul class="imglist">
            <li>
                <img src="@/assets/1.png" alt="">
            </li>
            <li>
                <img src="@/assets/2.png" alt="">
            </li>
            <li>
                <img src="@/assets/3.png" alt="">
            </li>
            <li>
                <img src="@/assets/4.png" alt="">
            </li>
        </ul>
          </div>
          <detailFlxed :item="item"></detailFlxed>
      </div>
  </div>
</template>

<script>
import detailFlxed from '../../components/detailflxed'
export default {
    components:{
        detailFlxed
    },
    data(){
        return{
            item:null,
        }
    },
    created(){
        
        this.item=JSON.parse(localStorage.getItem("detailList")) ;

        console.log(this.item)
    }
}
</script>

<style scoped lang="scss">
.detail{
    width: 100%;
    height: auto;
    .box{
        width: 960px;
        padding-top: 20px;
        overflow: hidden;
        margin: 0 auto;
        .left{
            width: 700px;
            height: 2000px;
            background: #fff;
            float: left;
            padding:25px 20px;
            .top{
                width: 100%;
                height: 41px;
                margin-bottom: 25px;
                img{
                    width: 40px;
                    height: 40px;
                    border-radius: 50%;
                    float: left;
                    margin-right: 10px;
                } 
                img[src=""]{
                    width: 0;
                    height: 0;
                    opacity: 0;
                }
                div{
                    float: left;
                    padding-top: 2px;
                    h1{
                        font-size: 14px;
                        color: #000;
                        font-weight: bold;
                        margin-bottom: 10px;
                    }
                    span{
                        padding: 0 15px 0 0;
                    }
                }
                button{
                    float: right;
                    width: 55px;
                    height: 26px;
                    font-size: 13px;
                    border: 1px solid #6cbd45;
                    color: #6cbd45;
                    background-color: #fff;
                }
            }
            .bannar{
                img{
                    width: 100%;
                    height: 367px;
                }
            }
            .content{
                width: 100%;
                h1{
                    margin:  10px 0 30px 0;
                    font-size: 28px;
                    font-weight: 700;
                    line-height: 1.5;
                }
                p{
                    line-height: 25px;
                    font-size: 14px;
                }
            }
        }
        .right{
            float: right;
            width: 240px;
            height: 1368px;
            background: #ffff;
            .author{
                width: 240px;
                height: 200px;
                margin-bottom: 18px;
                background: #fff;
                .text{
                    width: 100%;
                    height: 43px;
                    border-bottom: 1px solid hsla(0,0%,58.8%,.1);
                    padding: 12px 16px;
                }
                .info{
                    width: 100%;
                    height: 82px;
                    padding: 16px;
                    display: flex;
                    .img{
                        width: 50px;
                        height: 50px;
                        margin-right: 12px;
                        img{
                            width: 100%;
                        }
                    }
                    .info_main{
                        width: 147px;
                        height: 50px;
                        h3{
                            font-size: 16px;
                        }
                        p{
                            font-size: 15px;
                            margin-top: 8px;
                            color: #72777b;
                            height: 19px;
                            overflow: hidden;
                            line-height: 19px;
                        }
                    }
                }
                .post{
                    width: 240px;
                    height: 26px;
                    padding: 0 16px;
                    margin-bottom: 10px;
                    color: #000;
                }
                .read{
                    width: 240px;
                    height: 26px;
                    padding: 0 16px;
                    margin-bottom: 16px;
                    color: #000;
                }
            }
            .imglist{
                width: 240px;
                height: auto;
                li{
                    width: 240px;
                    height: 60px;
                    margin-bottom: 12px;
                    img{
                        width: 240px;
                        height: 60px;
                    }
                }
            }
        }
    }
}
</style>